<?php
namespace app\index\validate;

use think\Validate;

class Address extends Validate
{
    protected $rule = [
        'uid'  =>  'require',
        'address_basic' =>  'require',
        'phone' =>  ['regex'=>'/^1[3|4|5|7|8][0-9]{9}$/','require'],
        'address_detail' =>  'require',
        'cargo_person' => 'require'

    ];
    protected $message = [
        'phone.regex' =>  '手机号错误',
        'phone.require' =>'手机号错误',
        'uid' =>'不存在该用户',
        'address_basic' =>'地址提交有误',
        'address_detail' =>'地址提交为空',
        'cargo_person' =>'收货人尚未填写'
    ];
}